package main

import (
	"fmt"
	"go_dev/day5/homework4/random"
)

func select_sort(s []int){
	l := len(s)
	for i := 0; i < l-1; i++ {
		min_index := i
		for j := i+1; j < l; j++ {
			if s[min_index] > s[j] {
				min_index = j
			}
		}
		s[i], s[min_index] = s[min_index], s[i]
		fmt.Println(s)
	}
}

func main(){
	s := random.RandSlice(20)
	fmt.Println(s)
	select_sort(s)
	fmt.Println(s)
}